<?php

namespace App\Admin\Forms;

use App\Admin\Repositories\MissionDeposit;
use App\Models\School;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Form;
use Illuminate\Http\Request;

class ShareRatioForm extends Form
{
    public function handle(array $input)
    {

    }

    // 构建表单
    public function form()
    {
        $school_id = Admin::user()->school_id;
        $school = School::where('id', $school_id)->first();
        if ($school) {
            $this->text('share_ratio', '分成比例(%)')->value($school->share_ratio)->readOnly();
        }
        $this->disableSubmitButton();

        $this->disableResetButton();
    }
}
